<template>
  <div class="home">
    <div class="content">
      <div class="background-shapes">
        <div class="shape shape-1"></div>
        <div class="shape shape-2"></div>
        <div class="shape shape-3"></div>
      </div>
      <div class="intro">
        <h1 class="animate-in">{{ basic.name }}</h1>
        <h2 class="animate-in">{{ basic.englishName }}</h2>
        <h3 class="animate-in">{{ basic.title }}</h3>
        <p class="motto animate-in">{{ basic.motto }}</p>
      </div>
      <div class="contact animate-in">
        <div class="location">
          <i class="icon">📍</i>
          <span>{{ basic.location }}</span>
        </div>
        <div class="email">
          <i class="icon">📧</i>
          <a :href="`mailto:${basic.email}`">{{ basic.email }}</a>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { siteConfig } from '../config/site'

const basic = ref(siteConfig.basic)
</script>

<style lang="scss" scoped>
.home {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  position: relative;
  overflow: hidden;
}

.background-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 0;
  
  .shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), rgba(var(--primary-color-rgb), 0.3));
    filter: blur(60px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
    
    &-1 {
      width: 300px;
      height: 300px;
      top: -100px;
      left: -100px;
      animation-delay: 0s;
    }
    
    &-2 {
      width: 400px;
      height: 400px;
      bottom: -150px;
      right: -150px;
      animation-delay: -5s;
    }
    
    &-3 {
      width: 200px;
      height: 200px;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      animation-delay: -10s;
    }
  }
}

.content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  padding: 3rem;
  border-radius: 20px;
  background: rgba(var(--background-color-rgb), 0.8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.intro {
  margin-bottom: 2rem;

  h1 {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  }

  h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 600;
  }

  h3 {
    font-size: 2rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
    font-weight: 500;
  }

  .motto {
    font-size: 1.5rem;
    color: var(--text-color);
    opacity: 0.6;
    font-style: italic;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
  }
}

.contact {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 1.2rem;
  color: var(--text-color);

  .location,
  .email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 30px;
    transition: all 0.3s ease;

    &:hover {
      transform: translateY(-2px);
      background: rgba(var(--primary-color-rgb), 0.2);
    }

    .icon {
      font-size: 1.4rem;
    }
  }

  a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;

    &:hover {
      color: var(--primary-color);
    }
  }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(5%, 5%);
  }
  50% {
    transform: translate(0, 10%);
  }
  75% {
    transform: translate(-5%, 5%);
  }
}

.animate-in {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

@for $i from 1 through 5 {
  .animate-in:nth-child(#{$i}) {
    animation-delay: #{$i * 0.1}s;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .intro {
    h1 {
      font-size: 3rem;
    }

    h2 {
      font-size: 2rem;
    }

    h3 {
      font-size: 1.5rem;
    }

    .motto {
      font-size: 1.2rem;
    }
  }

  .contact {
    flex-direction: column;
    gap: 1rem;

    .location,
    .email {
      width: fit-content;
      margin: 0 auto;
    }
  }
  
  .content {
    padding: 2rem;
    margin: 1rem;
  }
}
</style> 